<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>巡检报告</title>
</head>
<style>
  html,
  body {
    margin: 0;
    padding: 0;
  }

  *,
  *::before,
  *::after {
    -webkit-box-sizing: border-box;
  }

  article {
    background: #F4FBFE;
    width: 100%;
    height: 100%;
    display: flex;
    font-size: 16px;
  }

  article > aside {
    flex: 1;
  }

  article > section {
    width: 800px;
    padding-bottom: 50px;
  }

  ul {
    margin: 0;
    padding: 0;
  }

  ul > li {
    list-style: none;
  }

  .header {
    width: 100%;
    height: 35px;
    background: rgba(31, 121, 255, 1);;
    color: rgba(255, 255, 255, 1);
    padding-left: 30px;
    padding-top: 5px;
    position: relative;
    border-radius: 5px;
  }

  h2 {
    margin: 0;
    height: 40px;
    line-height: 40px;
    font-weight: bold;
    text-align: center;
  }

  main {
    display: flex;
    /* padding: 15px;*/
    width: 100%;
    /*  height: 100%;*/
    /*    flex-direction: column;*/
    flex-wrap: wrap;
  }

  input[type="checkbox"] {
    display: none;
  }

  input[type="radio"] {
    display: none;
  }

  label.accordion {
    position: relative;
    height: 40px;
    width: 100%;
    text-align: left;
    line-height: 40px;
    background: rgba(216, 228, 247, 1);
    font-size: 16px;
    font-weight: bold;
    color: rgba(31, 121, 255, 1);
    display: inline-block;
    padding-left: 20px;
    border-radius: 5px;
  }

  label:hover {
    cursor: pointer;
  }

  .box {
    position: relative;
    display: none;
    width: 100%;
    background: white;
  }

  label + input[type="checkbox"] + .box {
    display: none;
  }

  label + input[type="checkbox"]:checked + .box {
    display: block;
  }

  label + input[type="radio"] + .box {
    display: none;
  }

  label + input[type="radio"]:checked + .box {
    display: block;
  }

  /*  input[type="checkbox"] + label::after {
      content: "";
      position: absolute;
      display: inline-block;
      top: 15px;
      right: 15px;
      width: 0;
      height: 0;
      border-left: 10px solid transparent;
      border-bottom: 10px rgba(0, 99, 255, 0.78) solid;
      border-right: 10px solid transparent;
      !*重点1*!
      transition: transform 0.2s ease-in;
    }

    input[type="checkbox"]:checked + label::after {
      content: "";
      position: absolute;
      display: inline-block;
      top: 15px;
      right: 15px;
      width: 0;
      height: 0;
      border-left: 10px solid transparent;
      border-bottom: 10px rgba(0, 99, 255, 0.78) solid;
      border-right: 10px solid transparent;
      !*重点2*!
      transform: rotate(180deg);
    }*/

  .subBox {
    position: relative;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    padding-top: 10px;
  }

  .myDetail {
    position: relative;
    width: 100%;
    display: flex;
    margin-top: 25px;
    font-size: 14px;
  }

  .myDetail::after {
    content: attr(data-words);
    width: 100%;
    height: 25px;
    display: inline-block;
    left: 35px;
    top: -25px;
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: #1F79FF;
  }

  .myDetail > div {
    flex: 1;
  }

  .myDetail ul {
    display: flex;
    margin-bottom: 10px;
    font-size: 14px;
  }

  .myDetail ul > li:first-child {
    width: 85px;
    text-align: right;
    color: #666;
  }

  .myDetail ul > li:last-child {
    color: #333;
    font-weight: bold;
    flex: 1;
  }

  table {
    border-collapse: collapse;
    width: 100%;
    text-align: center;
  }

  table tbody tr {
    background: #fff;
    border-bottom: 1px solid #E4E7ED;
  }

  tfoot tr, thead tr {
    height: 30px;
  }

  thead th:nth-child(2),
  thead th:nth-child(3),
  thead th:nth-child(4),
  thead th:nth-child(5) {
    text-align: center;
  }

  thead th:first-child {
    text-align: left;
  }

  thead th, tfoot td {
    color: white;
    background: rgb(109, 123, 138);
    font-size: 14px;
    font-weight: bold;
  }

  .myScore {
    position: relative;
    width: 180px;
    height: 180px;
    float: left;
  }

  .myScore::before {
    content: attr(data-words);
    width: 100%;
    height: 100%;
    display: inline-block;
    left: 0;
    top: 0;
    position: absolute;
    font-size: 35px;
    line-height: 180px;
    font-weight: bold;
    color: #dc6b1c;
    text-align: center;
  }

  .fatherHead th:nth-child(2),
  .fatherHead th:nth-child(3),
  .fatherHead th:last-child {
    width: 120px;
  }

  .subTable th:first-child {
    width: 150px;
    text-align: left;
    padding-left: 25px;
  }

  .subTable th:last-child {
    width: 120px;
  }

  .myTbody > tr > td:first-child {
    text-align: left;
    padding-left: 25px;
  }

  .fatherTbody > tr {

  }

  .limitColor {
    color: #409eff;
  }

  pre {
    text-align: left;
    margin: 0;
  }

  .showRow {
    margin: 0 5px;
  }

  .first-level {
    font-size: 14px;
    font-weight: bold;
    margin-left: 20px;
    color: #1F79FF;
  }

  .second-level {
    margin-left: 35px;
    font-size: 12px;
    color: #1F79FF;
  }

  .color-green {
    color: #3BD99F !important;
  }

  .color-red {
    color: #E95A5A !important;
  }

  .color-black {
    color: #000 !important;
  }

  a {
    color: #1F79FF;
  }

  .inspection-label {
    width: 100%;
    display: flex;
    justify-content: space-between;
    height: 30px;
    line-height: 30px;
  }

  .inspection-detail-head {
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: rgba(62, 58, 57, 0.89);
    color: white;
    border-radius: 2px;
    padding: 0 5px;
    height: 30px;
    line-height: 30px;
  }
  blockquote {
    width: 100%;
    margin: 0;
  }
</style>
<body>
<article>
  <aside></aside>
  <section>
    <div class="header">
      <img width="48" height="16"
           src="">
    </div>
    <h2>#{title} - 巡检报告</h2>
    <main>
      <label for="tab0" class="accordion">目录</label>
      <input type="checkbox" id="tab0" checked/>
      <aside class="box">
        <p><a id="back-to-inspection-summarize" class="first-level" href="#inspection-summarize">1.综述信息</a></p>
        <p><a id="back-to-inspection-base" class="second-level" href="#inspection-base">1.1巡检作业信息</a></p>
        <p><a id="back-to-inspection-summary" class="second-level" href="#inspection-summary">1.2巡检概述</a></p>
        <!--   <p><a class="first-level" href="#inspection-exception-list">2.巡检异常列表</a></p>-->
        <p><a id="back-to-inspection-score" class="first-level" href="#inspection-score">2.巡检得分</a></p>
        <p><a id="back-to-inspection-quality" class="first-level" href="#inspection-quality">3.异常指标影响度量</a></p>
        <p><a id="back-to-inspection-detail" class="first-level" href="#inspection-detail">4.巡检资源明细</a></p>
      </aside>
      <label for="tab1" class="accordion" id="inspection-summarize"><a
        href="#back-to-inspection-summarize">1.综述信息</a></label>
      <input type="checkbox" id="tab1" checked/>
      <aside class="box">
        <div class="subBox">
          <div class="myDetail" id="inspection-base" data-words="1.1巡检作业信息" style="padding-left: 25px;">
            <div>
              <ul>
                <li>作业名称：</li>
                <li>#{name}</li>
              </ul>
              <ul>
                <li>采集时间：</li>
                <li>#{startTime}</li>
              </ul>
              <ul>
                <li>资源总数：</li>
                <li>#{resourcesCount}</li>
              </ul>
              <ul>
                <li>指标总数：</li>
                <li>#{indicatorCount}</li>
              </ul>
            </div>
            <div>
              <ul>
                <li>执行人：</li>
                <li>#{inspectionPerson}</li>
              </ul>
              <ul>
                <li>结束时间：</li>
                <li>#{endTime}</li>
              </ul>
              <ul>
                <li>资源正常数：</li>
                <li class="color-green">#{resourcesNormalCount}</li>
              </ul>
              <ul>
                <li>指标正常数：</li>
                <li class="color-green">#{indicatorNormalCount}</li>
              </ul>
            </div>
            <div>
              <ul>
                <li>完成状态：</li>
                <li>#{status}</li>
              </ul>
              <ul>
                <li>巡检用时：</li>
                <li>#{spendTime}</li>
              </ul>
              <ul>
                <li>资源异常数：</li>
                <li class="color-red">#{resourcesExceptionCount}</li>
              </ul>
              <ul>
                <li>指标异常数：</li>
                <li class="color-red">#{indicatorExceptionCount}</li>
              </ul>
            </div>
          </div>

          <div class="myDetail" id="inspection-summary" data-words="1.2巡检概述">
            <blockquote style="color: #666;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本次巡检作业【<b
              class="showRow title">#{name}</b>】在<b class="showRow start-time">#{startTime}</b>到<b
              class="showRow end-time">#{endTime}</b>执行巡检，共用时<b class="showRow spend-time color-red">
              #{spendTime}</b>完成巡查。
              巡检的<span class="color-black">资源总数</span><b class="showRow resource-count">#{resourcesCount}</b>个，其中<span
                class="color-black">资源正常数</span><b class="showRow color-green normal-resource-count">#{resourcesNormalCount}</b>个，<span
                class="color-black">资源异常数</span><b class="showRow color-red err-resource-count">#{resourcesExceptionCount}</b>个。
              巡检的<span class="color-black">指标总数</span><b class="showRow kpi-count">#{indicatorCount}</b>个，其中<span
                class="color-black">指标正常数</span><b
                class="showRow color-green normal-kpi-count">#{indicatorNormalCount}</b>个，<span class="color-black">指标异常数</span><b
                class="showRow color-red err-kpi-count">#{indicatorExceptionCount}</b>个。
              <p class="color-black">以指标异常维度汇总如下：</p>
              <div class="kpi-list">
                #{kpiDetailList}
              </div>
              <p class="color-black"><span class="color-red">注：</span>主机IP后的数字表示该主机针对这项指标7天内出现的异常次数。</p>
            </blockquote>
          </div>
        </div>
      </aside>


      <!-- <input type="checkbox" name="tab" id="tab2" checked/>
       <label for="tab2">2.巡检异常列表</label>
       <aside class="box">
         <div class="subBox">
           <div class="myDetail" style="margin-top: 0" id="inspection-exception-list">
             #{inspectionException}
           </div>
         </div>
       </aside>-->
      <label for="ta3" class="accordion" id="inspection-score"><a href="#back-to-inspection-score">2.巡检得分</a></label>
      <input type="checkbox" id="ta3" name="tab" checked/>
      <aside class="box">
        <div class="subBox">
          <div style="margin-top: 0">
            <nav class="myScore" data-words="#{grade}">
              <img width="100%" height="100%"
                   src=""/>
            </nav>
            <div style="width: calc(100% - 200px);float: left;">
              <p style="color: #7c7d7e;">巡检进度：#{process}%</p>
              <p style="color: #7c7d7e;">共发现<span style="color: red;">#{kpiWrongNum}</span>个问题需要修复，建议及时修复。
              </p>
            </div>
          </div>
        </div>
      </aside>

      <label for="tab4" class="accordion" id="inspection-quality"><a
        href="#back-to-inspection-quality">3.异常指标影响度量</a></label>
      <input type="checkbox" id="tab4" checked/>
      <aside class="box">
        <div class="subBox">
          <div style="flex: 1;">
            <table class="myTable" cellspacing="0">
              <thead>
              <tr class="fatherHead">
                <th>指标名称</th>
                <th>影响资源个数</th>
                <th>影响资源百分比</th>
                <th>出现次数</th>
              </tr>
              </thead>
              <tbody class="myTbody fatherTbody">
              <!-- <tr>
                 <td>1</td>
                 <td>资产名称</td>
                 <td>100%</td>
                 <td>1</td>
               </tr>-->
              #{exceptionCheck}
              <!-- <tr>
                  <td colspan="4" style="padding-left: 20px;padding-right: 20px;">
                    <table class="myTable subTable" cellspacing="0">
                      <thead>
                      <tr>
                        <th>受影响资源</th>
                        <th>资源名称</th>
                        <th>异常原因</th>
                        <th>威胁分值</th>
                      </tr>
                      </thead>
                      <tbody class="myTbody">
                      <tr>
                        <td>ID</td>
                        <td>资产名称</td>
                        <td>100%</td>
                        <td>1</td>
                      </tr>
                      <tr>
                        <td>
                        </td>
                      </tr>
                      </tbody>
                    </table>
                  </td>
                </tr>-->
              </tbody>
            </table>
          </div>
        </div>
      </aside>

      <label for="tab5" class="accordion" id="inspection-detail"><a
        href="#back-to-inspection-detail">4.巡检资源明细</a></label>
      <input type="checkbox" id="tab5" checked/>
      <aside class="box">
        <div class="subBox" style="padding-top: 20px;">
          <blockquote class="inspection-detail-head">
            <span style='flex: 1;'>IP地址</span>
            <span style='flex: 1;'>主机名</span>
            <span style='flex: 1;'>健康指标总数</span>
            <span style='flex: 1;'>异常指标总数</span>
          </blockquote>
           #{inspectionDetail}
        </div>
      </aside>
    </main>
  </section>
  <aside>
  </aside>
</article>
</body>
</html>
